package org.spring.springcloud.util.uuid;import org.spring.springcloud.util.uuid.Encodes;import java.security.SecureRandom;import java.util.UUID;/** * Created by liyu2 on 2017/10/10. */public class UuidUtilsHK {    private static SecureRandom random = new SecureRandom();    public static String uuid()    {        return UUID.randomUUID().toString().replaceAll("-", "");    }    public static long randomLong()    {        return Math.abs(random.nextLong());    }    public static String randomBase62(int length)    {        byte[] randomBytes = new byte[length];        random.nextBytes(randomBytes);        return Encodes.encodeBase62(randomBytes);    }    public static long longUUID() {        return UUID.randomUUID().getMostSignificantBits();    }    public static long absLongUUID() {        long r;        do            r = longUUID();        while (r <= 2162214659975806976L);        return r;    }}